home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / pxflocaltime.z / pxflocaltime
Encoding:
Text File  |  2002-10-03  |  4.4 KB  |  115 lines

  1. PXFLOCALTIME(3F)                                      Last changed: 1-22-99
  2.  
  3.  
  4. NNAAMMEE
  5.      PPXXFFLLOOCCAALLTTIIMMEE - Converts to local time
  6.  
  7. SSYYNNOOPPSSIISS
  8.      SSUUBBRROOUUTTIINNEE PPXXFFLLOOCCAALLTTIIMMEE ((_i_s_e_c_n_d_s,, _i_a_t_i_m_e,, _i_e_r_r_o_r))
  9.      IINNTTEEGGEERR _i_s_e_c_n_d_s,, _i_a_t_i_m_e,, _i_e_r_r_o_r
  10.  
  11. IIMMPPLLEEMMEENNTTAATTIIOONN
  12.      UNICOS, UNICOS/mk, and IRIX systems
  13.  
  14. SSTTAANNDDAARRDDSS
  15.      IEEE standard interface for FORTRAN 77
  16.  
  17. DDEESSCCRRIIPPTTIIOONN
  18.      On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
  19.      default when compiling programs with the MIPSpro 7 Fortran 90 compiler
  20.      or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
  21.      F77 compiler.
  22.  
  23.      The PPXXFFLLOOCCAALLTTIIMMEE routine uses the llooccaallttiimmee function to convert
  24.      seconds since 00:00:00 CTU (coordinated universal time), January 1,
  25.      1970 (the _E_p_o_c_h), to broken-down time. Adjustments for time zone and
  26.      daylight savings time are made according to the TTZZ environment
  27.      variable.
  28.  
  29.      When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
  30.      UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
  31.      kind unless documented otherwise.  On UNICOS and UNICOS/mk, default
  32.      kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
  33.      IRIX, the default kind is KKIINNDD==44.
  34.  
  35.      The following is a list of valid arguments for this routine:
  36.  
  37.      _i_s_e_c_n_d_s   An input integer variable containing the number of seconds
  38.                since 00:00:00 CTU, January 1, 1970.
  39.  
  40.      _i_a_t_i_m_e    An output integer array with the elements:
  41.  
  42.                _i_a_t_i_m_e(1) =
  43.                          seconds (0-61, for leap seconds)
  44.  
  45.                _i_a_t_i_m_e(2) =
  46.                          minutes (0-59)
  47.  
  48.                _i_a_t_i_m_e(3) =
  49.                          hours (0-23)
  50.  
  51.                _i_a_t_i_m_e(4) =
  52.                          day of the month (1-31)
  53.  
  54.                _i_a_t_i_m_e(5) =
  55.                          month of the year (1-12)
  56.  
  57.                _i_a_t_i_m_e(6) =
  58.                          Gregorian year (e.g., 1995)
  59.  
  60.                _i_a_t_i_m_e(7) =
  61.                          Day of the week (0 = Sunday)
  62.  
  63.                _i_a_t_i_m_e(8) =
  64.                          Day of the year (1-366)
  65.  
  66.                _i_a_t_i_m_e(9) =
  67.                          Daylight savings flag (0 = standard, nonzero =
  68.                          daylight savings)
  69.  
  70.      _i_e_r_r_o_r    An output integer variable that contains zero if
  71.                PPXXFFLLOOCCAALLTTIIMMEE was successful or nonzero if PPXXFFLLOOCCAALLTTIIMMEE was
  72.                unsuccessful.
  73.  
  74.      This routine may return the EEIINNVVAALL error value if the current value of
  75.      the TTZZ environment variable is invalid. _i_a_t_i_m_e is left unchanged if
  76.      this error occurs.
  77.  
  78. EEXXAAMMPPLLEESS
  79.      In this example, the current time, date, and time system are displayed
  80.      if PPXXFFLLOOCCAALLTTIIMMEE and PPXXFFTTIIMMEE are successful.
  81.  
  82.           program pxftest
  83.           integer isecnds, iatime(9), ierror
  84.  
  85.           CALL PXFTIME(isecnds,ierror)
  86.             if (ierror .eq. 0) then
  87.                CALL PXFLOCALTIME(isecnds,iatime,ierror)
  88.                if (ierror .eq. 0) then
  89.                   print *,'Time: ',IATIME(3),':',IATIME(2),':',IATIME(1)
  90.                   print *,'Date: ',IATIME(4),'.',IATIME(5),'.',IATIME(6)
  91.                   if (IATIME(9) .eq. 0) then
  92.                      print *,'standard time'
  93.                   else
  94.                      print *,'daylight savings'
  95.                   endif
  96.                else
  97.                   print *,'PXFTIME error = ',ierror
  98.                endif
  99.             else
  100.                print *,'PXFTIME error = ',ierror
  101.             endif
  102.           end
  103.  
  104.      This example may display:
  105.  
  106.           Time: 8:37:24
  107.           Date: 11.7.1996
  108.           daylight savings
  109.  
  110. SSEEEE AALLSSOO
  111.      ccttiimmee(3C)
  112.  
  113.      _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed
  114.      version of this man page.
  115.